package main

import (
	"fmt"
	"time"
)

func main() {
	ticker := time.NewTicker(time.Second)

	n := 5
	for val := range ticker.C {
		fmt.Println(val)
		n--
		if n == 0 {
			ticker.Stop()
			break
		}
	}

	for {
		time.Sleep(time.Second)
		fmt.Println("hello ", n)
		n++
		if n > 5 {
			break
		}
	}
}
